import requests
from bs4 import BeautifulSoup
import os
import re

url = "https://www.sinodan.cc/view/738460.html"
resp = requests.get(url)
resp.encoding = 'utf-8'

# print(resp.text)
main_page = BeautifulSoup(resp.text, "html.parser")
mkname = main_page.title.string
print(mkname)
alist = main_page.find("div", class_="page-content font-large").find_all("p")
coutent = alist[1].text
coutent = re.sub(r'.*$', "", coutent)
coutent = re.sub(r'.*$', "", coutent)
coutent = coutent[:-2]
coutent = re.sub(r'^.*', "", coutent)
coutent = coutent[1:]
coutent = re.sub(r'^.*', "", coutent)
coutent = coutent[1:]
coutent = re.sub(r'^.*', "", coutent)
coutent = coutent[1:]
coutent = ' 　　' + coutent[10:]
print(coutent)
# with open("xx.txt", mode="w", encoding="utf-8") as f:
#     f.write(coutent)  

# f.close()